<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!--
=========================================================
Material Dashboard PRO - v2.1.2
=========================================================

Product Page: https://www.creative-tim.com/product/material-dashboard-pro
Copyright 2020 Creative Tim (https://www.creative-tim.com)
Coded by Creative Tim

=========================================================
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <link rel="apple-touch-icon" sizes="76x76" href="<%=basePath %>static/assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="<%=basePath %>static/assets/img/favicon.png">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>
    管理中心
  </title>
  <meta content='width=device-width, initial-scale=1.0, shrink-to-fit=no' name='viewport' />
  <!--     Fonts and icons     -->
  <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css">
  <!-- CSS Files -->
  <link href="<%=basePath %>static/assets/css/material-dashboard.css?v=2.1.2" rel="stylesheet" />
  <!-- CSS Just for demo purpose, don't include it in your project -->
  <link href="<%=basePath %>static/assets/demo/demo.css" rel="stylesheet" />

  <style>.sidebar .nav p,
  .sidebar .nav-link,.sidebar .nav li a, .sidebar .nav li .dropdown-menu a
  {
  font-size:18px;
  }
  </style>
</head>

<body class="">
  <div class="wrapper ">
    <div class="sidebar" data-color="rose" data-background-color="black" data-image="<%=basePath %>static/assets/img/sidebar-1.jpg">
      <!--
        Tip 1: You can change the color of the sidebar using: data-color="purple | azure | green | orange | danger"

        Tip 2: you can also add an image using data-image tag
    -->
      <div class="logo"><a href="<%=basePath %>" class="simple-text logo-mini">
        </a>
        <a href="<%=basePath %>" class="simple-text logo-normal">
        [<c:if
													test="${user.type==1}">
    员工
      </c:if>
<c:if
													test="${not empty user.grade}">
    +部门领导
      </c:if>


											<c:if test="${user.type==5}">
     管理员
      </c:if>]

        </a></div>
      <div class="sidebar-wrapper">

        <ul class="nav">

          <c:if test="${user.type eq 5 }">
          <li class="nav-item active ">
            <a class="nav-link"  target="mainframe" href="<%=basePath %>ordertab/ordertab/list">
              <i class="material-icons">timeline</i>
              <p> 员工一览表 </p>
            </a>
          </li>
          </c:if>
             <c:if test="${user.type ne 5 }">

          <li class="nav-item active ">
            <a class="nav-link"  target="mainframe" href="<%=basePath %>ordertab/ordertab/list?company=${user.company}">
              <i class="material-icons">timeline</i>
              <p> 部门员工 </p>
            </a>
          </li>

          </c:if>


            <c:if test="${user.type eq 5 }">

            <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples1">
              <i class="material-icons">timeline</i>
              <p> 部门管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples1">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link " href="<%=basePath %>infocate/infocate/list"
                   target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  部门管理</span>
                  </a>
                </li>
                <li class="nav-item ">
                  <a class="nav-link layer" href="<%=basePath %>infocate/infocate/add" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal"> 新增部门 </span>
                  </a>
                </li>
              </ul>
            </div>
          </li>

          <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples">
              <i class="material-icons">timeline</i>
              <p> 员工管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>users/users/list?type=1" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  员工管理</span>
                  </a>
                </li>
                <li class="nav-item ">
                  <a class="nav-link layer" href="<%=basePath %>users/users/add?type=1" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal"> 新增员工 </span>
                  </a>
                </li>
              </ul>
            </div>
          </li>



          <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples2">
              <i class="material-icons">timeline</i>
              <p> 考勤管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples2">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/kq" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  考勤管理</span>
                  </a>
                </li>

              </ul>
            </div>
          </li>


          <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples3">
              <i class="material-icons">timeline</i>
              <p> 请假管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples3">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/qj1" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  请假管理</span>
                  </a>
                </li>

              </ul>
            </div>
          </li>

          <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples5">
              <i class="material-icons">timeline</i>
              <p> 加班管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples5">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/jb" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  加班管理</span>
                  </a>
                </li>

              </ul>
            </div>
          </li>

          <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples4">
              <i class="material-icons">timeline</i>
              <p> 薪资管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples4">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/cj" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  薪资管理</span>
                  </a>
                </li>

              </ul>
            </div>
          </li>

          <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples6">
              <i class="material-icons">timeline</i>
              <p> 公告管理
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse" id="pagesExamples6">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>news/news/list" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  公告管理</span>
                  </a>
                </li>
                 <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>news/news/add" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  发布公告</span>
                  </a>
                </li>
              </ul>
            </div>
          </li>

          </c:if>

           <c:if test="${user.type eq 1 }">

           <li class="nav-item ">
            <a class="nav-link" data-toggle="collapse" href="#pagesExamples2">
              <i class="material-icons">timeline</i>
              <p> 管理菜单
                <b class="caret"></b>
              </p>
            </a>
            <div class="collapse show" id="pagesExamples2">
              <ul class="nav">
                <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/kq" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  考勤管理</span>
                  </a>
                </li>

                 <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/qj1" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  请假管理</span>
                  </a>
                </li>


                 <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/jb" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  加班管理</span>
                  </a>
                </li>

                 <li class="nav-item ">
                  <a class="nav-link" href="<%=basePath %>ordertab/ordertab/cj" target="mainframe">
                    <span class="sidebar-mini"> - </span>
                    <span class="sidebar-normal">  我的薪资</span>
                  </a>
                </li>


              </ul>
            </div>
          </li>



          </c:if>

        </ul>
      </div>
    </div>
    <div class="main-panel">
      <!-- Navbar -->
      <nav class="navbar navbar-expand-lg navbar-transparent navbar-absolute fixed-top ">
        <div class="container-fluid">
          <div class="navbar-wrapper">
            <div class="navbar-minimize">
              <button id="minimizeSidebar" class="btn btn-just-icon btn-white btn-fab btn-round">
                <i class="material-icons text_align-center visible-on-sidebar-regular">more_vert</i>
                <i class="material-icons design_bullet-list-67 visible-on-sidebar-mini">view_list</i>
              </button>
            </div>
            <a class="navbar-brand" href="javascript:;">${user.realname}！
            就职于${dept.title }^_^
            </a>
          </div>
          <button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
            <span class="sr-only">Toggle navigation</span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
          </button>
          <div class="collapse navbar-collapse justify-content-end">

            <ul class="navbar-nav">

              <li class="nav-item dropdown">
                <a class="nav-link" href="javascript:;" id="navbarDropdownProfile" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="material-icons">person</i>
                  <p class="d-lg-none d-md-block">
                    Account
                  </p>
                </a>
                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownProfile">
                  <a class="dropdown-item layer" href="<%=basePath %>users/users/profile" target="mainframe" >个人信息</a>
                  <a class="dropdown-item layer" href="<%=basePath %>users/users/password" target="mainframe" >密码安全</a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="<%=basePath%>backendui/logout?retUrl=login">注销登录</a>
                </div>
              </li>
            </ul>
          </div>
        </div>
      </nav>
      <!-- End Navbar -->
      <div class="content">
        <div class="content">
          <div class="container-fluid">
            <div class="row">
              <div class="col-md-12">
               	<iframe src="<%=basePath %>news/all" id="mainframe" name="mainframe" style="width:100%;min-height:1968px;border:none;"></iframe>
      </div> </div> </div> </div>
    </div>
  </div>

  <!--   Core JS Files   -->
  <script src="<%=basePath %>static/assets/js/core/jquery.min.js"></script>
  <script src="<%=basePath %>static/assets/js/core/popper.min.js"></script>
  <script src="<%=basePath %>static/assets/js/core/bootstrap-material-design.min.js"></script>
  <script src="<%=basePath %>static/assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
  <!-- Plugin for the momentJs  -->
  <script src="<%=basePath %>static/assets/js/plugins/moment.min.js"></script>
  <!--  Plugin for Sweet Alert -->
  <script src="<%=basePath %>static/assets/js/plugins/sweetalert2.js"></script>
  <!-- Forms Validations Plugin -->
  <script src="<%=basePath %>static/assets/js/plugins/jquery.validate.min.js"></script>
  <!-- Plugin for the Wizard, full documentation here: https://github.com/VinceG/twitter-bootstrap-wizard -->
  <script src="<%=basePath %>static/assets/js/plugins/jquery.bootstrap-wizard.js"></script>
  <!--	Plugin for Select, full documentation here: http://silviomoreto.github.io/bootstrap-select -->
  <script src="<%=basePath %>static/assets/js/plugins/bootstrap-selectpicker.js"></script>
  <!--  Plugin for the DateTimePicker, full documentation here: https://eonasdan.github.io/bootstrap-datetimepicker/ -->
  <script src="<%=basePath %>static/assets/js/plugins/bootstrap-datetimepicker.min.js"></script>
  <!--  DataTables.net Plugin, full documentation here: https://datatables.net/  -->
  <script src="<%=basePath %>static/assets/js/plugins/jquery.dataTables.min.js"></script>
  <!--	Plugin for Tags, full documentation here: https://github.com/bootstrap-tagsinput/bootstrap-tagsinputs  -->
  <script src="<%=basePath %>static/assets/js/plugins/bootstrap-tagsinput.js"></script>
  <!-- Plugin for Fileupload, full documentation here: http://www.jasny.net/bootstrap/javascript/#fileinput -->
  <script src="<%=basePath %>static/assets/js/plugins/jasny-bootstrap.min.js"></script>
  <!--  Full Calendar Plugin, full documentation here: https://github.com/fullcalendar/fullcalendar    -->
  <script src="<%=basePath %>static/assets/js/plugins/fullcalendar.min.js"></script>
  <!-- Vector Map plugin, full documentation here: http://jvectormap.com/documentation/ -->
  <script src="<%=basePath %>static/assets/js/plugins/jquery-jvectormap.js"></script>
  <!--  Plugin for the Sliders, full documentation here: http://refreshless.com/nouislider/ -->
  <script src="<%=basePath %>static/assets/js/plugins/nouislider.min.js"></script>
  <!-- Include a polyfill for ES6 Promises (optional) for IE11, UC Browser and Android browser support SweetAlert -->

  <!-- Library for adding dinamically elements -->
  <script src="<%=basePath %>static/assets/js/plugins/arrive.min.js"></script>
  <!--  Google Maps Plugin    -->

  <!-- Chartist JS -->
  <script src="<%=basePath %>static/assets/js/plugins/chartist.min.js"></script>
  <!--  Notifications Plugin    -->
  <script src="<%=basePath %>static/assets/js/plugins/bootstrap-notify.js"></script>
  <!-- Control Center for Material Dashboard: parallax effects, scripts for the example pages etc -->
  <script src="<%=basePath %>static/assets/js/material-dashboard.js?v=2.1.2" type="text/javascript"></script>
  <!-- Material Dashboard DEMO methods, don't include it in your project! -->
  <script src="<%=basePath %>static/assets/demo/demo.js"></script>
   <script src="<%=basePath %>static/layer/layer.js"></script>
    <script>

    $(document).ready(function(){

    	$(".nav-link.layer,.dropdown-item.layer").click(function(e){
    		e.preventDefault();var that = $(this)
    		layer.open({
    			title:'操作面板',
    			  type: 2,
    			  skin: 'layui-layer-demo', //样式类名
    			  closeBtn: 1, //不显示关闭按钮
    			  anim: 2,
    			  area:["60%","70%"],
    			  shadeClose: true, //开启遮罩关闭
    			  content:that.attr("href")
    			});
    	})
    })
    </script>

  <script>
    $(document).ready(function() {
      $().ready(function() {
        $sidebar = $('.sidebar');

        $sidebar_img_container = $sidebar.find('.sidebar-background');

        $full_page = $('.full-page');

        $sidebar_responsive = $('body > .navbar-collapse');

        window_width = $(window).width();

        fixed_plugin_open = $('.sidebar .sidebar-wrapper .nav li.active a p').html();

        if (window_width > 767 && fixed_plugin_open == 'Dashboard') {
          if ($('.fixed-plugin .dropdown').hasClass('show-dropdown')) {
            $('.fixed-plugin .dropdown').addClass('open');
          }

        }

        $('.fixed-plugin a').click(function(event) {
          // Alex if we click on switch, stop propagation of the event, so the dropdown will not be hide, otherwise we set the  section active
          if ($(this).hasClass('switch-trigger')) {
            if (event.stopPropagation) {
              event.stopPropagation();
            } else if (window.event) {
              window.event.cancelBubble = true;
            }
          }
        });

        $('.fixed-plugin .active-color span').click(function() {
          $full_page_background = $('.full-page-background');

          $(this).siblings().removeClass('active');
          $(this).addClass('active');

          var new_color = $(this).data('color');

          if ($sidebar.length != 0) {
            $sidebar.attr('data-color', new_color);
          }

          if ($full_page.length != 0) {
            $full_page.attr('filter-color', new_color);
          }

          if ($sidebar_responsive.length != 0) {
            $sidebar_responsive.attr('data-color', new_color);
          }
        });

        $('.fixed-plugin .background-color .badge').click(function() {
          $(this).siblings().removeClass('active');
          $(this).addClass('active');

          var new_color = $(this).data('background-color');

          if ($sidebar.length != 0) {
            $sidebar.attr('data-background-color', new_color);
          }
        });

        $('.fixed-plugin .img-holder').click(function() {
          $full_page_background = $('.full-page-background');

          $(this).parent('li').siblings().removeClass('active');
          $(this).parent('li').addClass('active');


          var new_image = $(this).find("img").attr('src');

          if ($sidebar_img_container.length != 0 && $('.switch-sidebar-image input:checked').length != 0) {
            $sidebar_img_container.fadeOut('fast', function() {
              $sidebar_img_container.css('background-image', 'url("' + new_image + '")');
              $sidebar_img_container.fadeIn('fast');
            });
          }

          if ($full_page_background.length != 0 && $('.switch-sidebar-image input:checked').length != 0) {
            var new_image_full_page = $('.fixed-plugin li.active .img-holder').find('img').data('src');

            $full_page_background.fadeOut('fast', function() {
              $full_page_background.css('background-image', 'url("' + new_image_full_page + '")');
              $full_page_background.fadeIn('fast');
            });
          }

          if ($('.switch-sidebar-image input:checked').length == 0) {
            var new_image = $('.fixed-plugin li.active .img-holder').find("img").attr('src');
            var new_image_full_page = $('.fixed-plugin li.active .img-holder').find('img').data('src');

            $sidebar_img_container.css('background-image', 'url("' + new_image + '")');
            $full_page_background.css('background-image', 'url("' + new_image_full_page + '")');
          }

          if ($sidebar_responsive.length != 0) {
            $sidebar_responsive.css('background-image', 'url("' + new_image + '")');
          }
        });

        $('.switch-sidebar-image input').change(function() {
          $full_page_background = $('.full-page-background');

          $input = $(this);

          if ($input.is(':checked')) {
            if ($sidebar_img_container.length != 0) {
              $sidebar_img_container.fadeIn('fast');
              $sidebar.attr('data-image', '#');
            }

            if ($full_page_background.length != 0) {
              $full_page_background.fadeIn('fast');
              $full_page.attr('data-image', '#');
            }

            background_image = true;
          } else {
            if ($sidebar_img_container.length != 0) {
              $sidebar.removeAttr('data-image');
              $sidebar_img_container.fadeOut('fast');
            }

            if ($full_page_background.length != 0) {
              $full_page.removeAttr('data-image', '#');
              $full_page_background.fadeOut('fast');
            }

            background_image = false;
          }
        });

        $('.switch-sidebar-mini input').change(function() {
          $body = $('body');

          $input = $(this);

          if (md.misc.sidebar_mini_active == true) {
            $('body').removeClass('sidebar-mini');
            md.misc.sidebar_mini_active = false;

            $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar();

          } else {

            $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar('destroy');

            setTimeout(function() {
              $('body').addClass('sidebar-mini');

              md.misc.sidebar_mini_active = true;
            }, 300);
          }

          // we simulate the window Resize so the charts will get updated in realtime.
          var simulateWindowResize = setInterval(function() {
            window.dispatchEvent(new Event('resize'));
          }, 180);

          // we stop the simulation of Window Resize after the animations are completed
          setTimeout(function() {
            clearInterval(simulateWindowResize);
          }, 1000);

        });
      });
    });
  </script>
  <script>
    $(document).ready(function() {
      // Javascript method's body can be found in assets/js/demos.js
      md.initDashboardPageCharts();

      md.initVectorMap();

    });
  </script>

		<script src="<%=basePath%>static/sub/jquery.min.js"></script>
<script src="<%=basePath%>static/a.js" data-cf-settings="7eeddea5b1915bb2bdd96b69-|49" defer=""></script>
<script src="<%=basePath%>static/b.js" data-cf-settings="7eeddea5b1915bb2bdd96b69-|49" defer=""></script>

<a href="javascript:;" id="showMsgBtn" onclick="show()"></a>
<input type="hidden" id="msg" value="">
<script>
function show(){
	alert($("#msg").val());
}
</script>


</body>
</html>
